home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oh!X 2001 Spring
/
Oh!X 2001 Spring Special CD-ROM (Japan).7z
/
Oh!X 2001 Spring Special CD-ROM (Japan) (Track 1).bin
/
FBENC
/
TEC-FB^3.sea
/
TEC-FB^3
/
UnicodeConverter.Incl
< prev
next >
Wrap
Text File
|
2000-03-24
|
5KB
|
156 lines
/*
File: UnicodeConverter.h
Contains: Types, constants, and prototypes for Unicode Converter
Version: Mac OS 8.7
DRI: Julio Gonzalez
Copyright: ゥ 1994-1999 by Apple Computer, Inc., all rights reserved.
Warning: *** APPLE INTERNAL USE ONLY ***
This file may contain unreleased API's
BuildInfo: Built by: BuildGod
On: 09/17/99 11:19 AM
With Interfacer: 3.0d13 (MPW PowerPC)
From: UnicodeConverter.i
Revision: 14
Dated: 5/20/99
Last change by: ngk
Last comment: Add CarbonLib exportset to ProcPtrs
Bugs: Report bugs to Radar component "System Interfaces", "Latest"
List the version information (from above) in the Problem Description.
*/
/* Unicode conversion contexts: */
#DEFINE TextToUnicodeInfo AS POINTER// TO OpaqueTextToUnicodeInfo
#DEFINE UnicodeToTextInfo AS POINTER// TO OpaqueUnicodeToTextInfo
#DEFINE UnicodeToTextRunInfo AS POINTER// TO OpaqueUnicodeToTextRunInfo
#DEFINE ConstTextToUnicodeInfo AS TextToUnicodeInfo
#DEFINE ConstUnicodeToTextInfo AS UnicodeToTextInfo
/* UnicodeMapVersion type & values */
#DEFINE UnicodeMapVersion AS SInt32
BEGIN enum
_kUnicodeUseLatestMapping = -1
_kUnicodeUseHFSPlusMapping = 4
END ENUM
/* Types used in conversion */
BEGIN RECORD UnicodeMapping
DIM unicodeEncoding AS TextEncoding
DIM otherEncoding AS TextEncoding
DIM mappingVersion AS UnicodeMapVersion
END RECORD
#DEFINE UnicodeMappingPtr AS POINTER TO UnicodeMapping
#DEFINE ConstUnicodeMappingPtr AS POINTER TO UnicodeMapping
/* Control flags for ConvertFromUnicodeToText and ConvertFromTextToUnicode */
BEGIN enum
_kUnicodeUseFallbacksBit = 0
_kUnicodeKeepInfoBit = 1
_kUnicodeDirectionalityBits = 2
_kUnicodeVerticalFormBit = 4
_kUnicodeLooseMappingsBit = 5
_kUnicodeStringUnterminatedBit = 6
_kUnicodeTextRunBit = 7
_kUnicodeKeepSameEncodingBit = 8
_kUnicodeForceASCIIRangeBit = 9
_kUnicodeNoHalfwidthCharsBit = 10
_kUnicodeTextRunHeuristicsBit = 11
END ENUM
BEGIN enum
_kUnicodeUseFallbacksMask = 1 <<_kUnicodeUseFallbacksBit
_kUnicodeKeepInfoMask = 1 <<_kUnicodeKeepInfoBit
_kUnicodeDirectionalityMask = 3 <<_kUnicodeDirectionalityBits
_kUnicodeVerticalFormMask = 1 <<_kUnicodeVerticalFormBit
_kUnicodeLooseMappingsMask = 1 <<_kUnicodeLooseMappingsBit
_kUnicodeStringUnterminatedMask = 1 <<_kUnicodeStringUnterminatedBit
_kUnicodeTextRunMask = 1 <<_kUnicodeTextRunBit
_kUnicodeKeepSameEncodingMask = 1 <<_kUnicodeKeepSameEncodingBit
_kUnicodeForceASCIIRangeMask = 1 <<_kUnicodeForceASCIIRangeBit
_kUnicodeNoHalfwidthCharsMask = 1 <<_kUnicodeNoHalfwidthCharsBit
_kUnicodeTextRunHeuristicsMask = 1 <<_kUnicodeTextRunHeuristicsBit
END ENUM
/* Values for kUnicodeDirectionality field */
BEGIN enum
_kUnicodeDefaultDirection = 0
_kUnicodeLeftToRight = 1
_kUnicodeRightToLeft = 2
END ENUM
/* Directionality masks for control flags */
BEGIN enum
_kUnicodeDefaultDirectionMask =_kUnicodeDefaultDirection <<_kUnicodeDirectionalityBits
_kUnicodeLeftToRightMask =_kUnicodeLeftToRight <<_kUnicodeDirectionalityBits
_kUnicodeRightToLeftMask =_kUnicodeRightToLeft <<_kUnicodeDirectionalityBits
END ENUM
/* Control flags for TruncateForUnicodeToText: */
/*
Now TruncateForUnicodeToText uses control flags from the same set as used by
ConvertFromTextToUnicode, ConvertFromUnicodeToText, etc., but only
kUnicodeStringUnterminatedMask is meaningful for TruncateForUnicodeToText.
Previously two special control flags were defined for TruncateForUnicodeToText:
kUnicodeTextElementSafeBit = 0
kUnicodeRestartSafeBit = 1
However, neither of these was implemented.
Instead of implementing kUnicodeTextElementSafeBit, we now use
kUnicodeStringUnterminatedMask since it accomplishes the same thing and avoids
having special flags just for TruncateForUnicodeToText
Also, kUnicodeRestartSafeBit is unnecessary, since restart-safeness is handled by
setting kUnicodeKeepInfoBit with ConvertFromUnicodeToText.
If TruncateForUnicodeToText is called with one or both of the old special control
flags set (bits 0 or 1), it will not generate a paramErr, but the old bits have no
effect on its operation.
*/
/* Filter bits for filter field in QueryUnicodeMappings and CountUnicodeMappings: */
BEGIN enum
_kUnicodeMatchUnicodeBaseBit = 0
_kUnicodeMatchUnicodeVariantBit = 1
_kUnicodeMatchUnicodeFormatBit = 2
_kUnicodeMatchOtherBaseBit = 3
_kUnicodeMatchOtherVariantBit = 4
_kUnicodeMatchOtherFormatBit = 5
END ENUM
BEGIN enum
_kUnicodeMatchUnicodeBaseMask = 1 <<_kUnicodeMatchUnicodeBaseBit
_kUnicodeMatchUnicodeVariantMask = 1 <<_kUnicodeMatchUnicodeVariantBit
_kUnicodeMatchUnicodeFormatMask = 1 <<_kUnicodeMatchUnicodeFormatBit
_kUnicodeMatchOtherBaseMask = 1 <<_kUnicodeMatchOtherBaseBit
_kUnicodeMatchOtherVariantMask = 1 <<_kUnicodeMatchOtherVariantBit
_kUnicodeMatchOtherFormatMask = 1 <<_kUnicodeMatchOtherFormatBit
END ENUM
/* Control flags for SetFallbackUnicodeToText */
BEGIN enum
_kUnicodeFallbackSequencingBits = 0
END ENUM
BEGIN enum
_kUnicodeFallbackSequencingMask = 3 <<_kUnicodeFallbackSequencingBits
_kUnicodeFallbackInterruptSafeMask = 1 << 2 /* To indicate that caller fallback routine doesnユt move memory*/
END ENUM
/* values for kUnicodeFallbackSequencing field */
BEGIN enum
_kUnicodeFallbackDefaultOnly = 0
_kUnicodeFallbackCustomOnly = 1
_kUnicodeFallbackDefaultFirst = 2
_kUnicodeFallbackCustomFirst = 3
END ENUM